<#import "/spring.ftl" as spring/>
<#macro basePath>${rootPath!'/'}</#macro>
<#macro greet>
<font size="+2">Hello Joe!</font>
</#macro>

<#macro testStr>
    <script type="text/javascript">
        test str
    </script>
</#macro>
<#--插件-->
<#macro importPlugin(pathList...)>
    <#list pathList as path>
        <#if path?ends_with('js')>
        <script src="<@basePath/>/resources/plugins/${path}" type="text/javascript"></script>
        </#if>
        <#if path?ends_with('css')>
        <link href="<@basePath/>/resources/plugins/${path}" rel="stylesheet" type="text/css"></link>
        </#if>
    </#list>
</#macro>

<#macro importRequest()>
<!--[if lt IE 9]>
    <@importPlugin "ajax/json2.js" />
<![endif]-->
    <@importPlugin "ajax/Request.js" />
<script type="text/javascript">Request.BASH_PATH = "<@basePath/>";</script>
</#macro>
<#macro importWebsocket()>
    <@importPlugin "socket/websocket.js" />
<script type="text/javascript">
    Socket.URL = "<@basePath/>".replace("http", "ws") + "socket";
    if (Socket.URL.indexOf("/") == 0) Socket.URL = "ws://" + window.location.host + Socket.URL;
</script>
</#macro>
<#macro importFontIcon>
    <@resources "icons/css/font-awesome.min.css"/>
</#macro>
<#--资源文件-->
<#macro resources(paths...)>
    <#list paths as path>
        <#if path?ends_with('js')>
        <script src="<@basePath/>/resources/${path}" type="text/javascript"></script>
        </#if>
        <#if path?ends_with('css')>
        <link href="<@basePath/>/resources/${path}" rel="stylesheet" type="text/css"></link>
        </#if>
    </#list>
</#macro>
<#--jquery-cdn-->
<#macro importJquery>
    <@importPlugin "easyui/jquery.min.js"/>
</#macro>
<#--miniui-->
<#macro importEasyUi themes...>
<script type="text/javascript">window.BASE_PATH = "<@basePath/>"</script>
<style type="text/css">
    * {
        font-size:12;
    }
</style>
<script type="text/javascript">
    function openCenterWindow(url,windowName,width,height){
        var left = (window.screen.availWidth-10-width)/2;
        var top = (window.screen.availHeight-30-height)/2;

        var wnd=window.open(url,windowName,"height="+height+",width="+width+",top="+top+",left="+left+",resizable=yes,scrollbars=yes,status=no,location=no,");
        return wnd;
    }
</script>
    <@importJquery />
    <@importPlugin
                     "easyui/themes/color.css",
                     "easyui/themes/icon.css",
                     "easyui/themes/metro/easyui.css",
                     "easyui/locale/easyui-lang-zh_CN.js",
                     "easyui/jquery.easyui.min.js"/>
</#macro>
<#--&lt;#&ndash;ueditor&ndash;&gt;-->
<#--<#macro importUeditor>-->
<#--<script type="text/javascript" charset="utf-8">-->
    <#--window.UEDITOR_HOME_URL = "<@basePath/>ui/plugins/ueditor/";-->
<#--</script>-->
    <#--<@importPlugin "ueditor/ueditor.config.js"-->
    <#--,"ueditor/ueditor.all.min.js"-->
    <#--, "ueditor/themes/default/css/ueditor.min.css"-->
    <#--, "ueditor/lang/zh-cn/zh-cn.js"-->
    <#--/>-->
<#--</#macro>-->

<#--<#macro importUeditorParser>-->
<#--<script type="text/javascript" charset="utf-8">-->
    <#--window.UEDITOR_HOME_URL = "<@basePath/>ui/plugins/ueditor/";-->
<#--</script>-->
    <#--<@importPlugin "ueditor/ueditor.parse.js"-->
    <#--,"ueditor/themes/default/dialogbase.css"-->
    <#--/>-->
<#--</#macro>-->

<#macro pluginUrl(uri)><@basePath/>resources/plugins/${uri}</#macro>

<#macro api(uri)><@basePath/>${uri}</#macro>